Skip to content

feat(paas): add --env and --env-file flags for worker deploy#27

Merged
emilioacc merged 1 commit intomainfrom
emilio/atxp-1422-support-environment-variables-for-worker-deploy-env-keyvalue
Jan 28, 2026
Merged

feat(paas): add --env and --env-file flags for worker deploy#27
emilioacc merged 1 commit intomainfrom
emilio/atxp-1422-support-environment-variables-for-worker-deploy-env-keyvalue

Conversation

@emilioacc
Copy link
Contributor

Summary

  • Add --env KEY=VALUE flag (repeatable) for setting individual environment variables
  • Add --env-file <path> flag to load env vars from a .env file
  • --env takes precedence over --env-file for duplicate keys
  • Validation for reserved names (DB, BUCKET, ANALYTICS, USER_NAMESPACE)
  • Warning for sensitive-looking variables (SECRET, PASSWORD, KEY, TOKEN, CREDENTIAL)

Test plan

  • Deploy a worker with --env API_KEY=test123 --env DEBUG=true and verify they're accessible via env.API_KEY and env.DEBUG
  • Deploy a worker with --env-file .env and verify env vars are loaded
  • Deploy with both --env-file and --env and verify --env takes precedence
  • Verify reserved names are rejected
  • Verify warning is shown for sensitive-looking names

Related PRs

  • circuitandchisel/atxp-paas#TBD (backend support)

Linear ticket

Closes ATXP-1422

🤖 Generated with Claude Code

Add support for setting environment variables when deploying workers:
- --env KEY=VALUE flag (repeatable) for individual env vars
- --env-file <path> flag to load from a .env file
- --env takes precedence over --env-file for duplicate keys
- Validation for reserved names (DB, BUCKET, ANALYTICS, USER_NAMESPACE)
- Warning for sensitive-looking variables (SECRET, PASSWORD, KEY, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@emilioacc emilioacc merged commit 44e20ca into main Jan 28, 2026
1 check passed
@emilioacc emilioacc deleted the emilio/atxp-1422-support-environment-variables-for-worker-deploy-env-keyvalue branch January 28, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant